module.exports = {
	devtool: 'eval-source-map',//调试工具
	entry: __dirname + "/app/main.js",//__dirname全局变量，指程序根目录
	output: {
		path: __dirname + "/public",
		filename: "bundle.js"
	},
	devServer: {
		contentBase: "./public",//本地服务器所加载的页面所在的目录
		colors: true,//终端中输出结果为彩色
		historyApiFallback: true,//不跳转
		inline: true
	},
	module: {
		loaders: [{
			test: /\.js$/,
			exclude: /node_modules/,
			loader: "babel"
		}, {
			test: /\.css/,
			loader: "style!css"
		}, {
			test: /\.(png|jpg)$/,
			loader: 'url-loader'
		}]
	},
	postcss: [
		require('autoprefixer')//调用autoprefixer插件
	]
};